/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.dengues.model.database;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.AbstractEnumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>EMF Data Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.dengues.model.database.DatabasePackage#getEMFDataType()
 * @model
 * @generated
 */
public final class EMFDataType extends AbstractEnumerator {
    /**
     * The '<em><b>DATABASE</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>DATABASE</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #DATABASE_LITERAL
     * @model
     * @generated
     * @ordered
     */
    public static final int DATABASE = 0;

    /**
     * The '<em><b>QUERY</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>QUERY</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #QUERY_LITERAL
     * @model
     * @generated
     * @ordered
     */
    public static final int QUERY = 1;

    /**
     * The '<em><b>DATABASE</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #DATABASE
     * @generated
     * @ordered
     */
    public static final EMFDataType DATABASE_LITERAL = new EMFDataType(DATABASE, "DATABASE", "DATABASE");

    /**
     * The '<em><b>QUERY</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #QUERY
     * @generated
     * @ordered
     */
    public static final EMFDataType QUERY_LITERAL = new EMFDataType(QUERY, "QUERY", "QUERY");

    /**
     * An array of all the '<em><b>EMF Data Type</b></em>' enumerators.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private static final EMFDataType[] VALUES_ARRAY =
        new EMFDataType[] {
            DATABASE_LITERAL,
            QUERY_LITERAL,
        };

    /**
     * A public read-only list of all the '<em><b>EMF Data Type</b></em>' enumerators.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

    /**
     * Returns the '<em><b>EMF Data Type</b></em>' literal with the specified literal value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static EMFDataType get(String literal) {
        for (int i = 0; i < VALUES_ARRAY.length; ++i) {
            EMFDataType result = VALUES_ARRAY[i];
            if (result.toString().equals(literal)) {
                return result;
            }
        }
        return null;
    }

    /**
     * Returns the '<em><b>EMF Data Type</b></em>' literal with the specified name.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static EMFDataType getByName(String name) {
        for (int i = 0; i < VALUES_ARRAY.length; ++i) {
            EMFDataType result = VALUES_ARRAY[i];
            if (result.getName().equals(name)) {
                return result;
            }
        }
        return null;
    }

    /**
     * Returns the '<em><b>EMF Data Type</b></em>' literal with the specified integer value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static EMFDataType get(int value) {
        switch (value) {
            case DATABASE: return DATABASE_LITERAL;
            case QUERY: return QUERY_LITERAL;
        }
        return null;
    }

    /**
     * Only this class can construct instances.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EMFDataType(int value, String name, String literal) {
        super(value, name, literal);
    }

} //EMFDataType
